package main

import (
	"context"
	"fmt"

	"github.com/micro/go-micro"
	"go-guide/micro/example1/proto"
)

func main() {
	service := micro.NewService(micro.Name("greeter.client"))

	service.Init()

	greeter := proto.NewGreeterService("greeter", service.Client())

	// call the greeter

	rsp, err := greeter.Hello(context.TODO(), &proto.Request{Name: "Gark"})

	if err != nil {
		fmt.Println(err)
	}

	fmt.Println(rsp.Greeting)

}
